fix(api): repair voice notes and Veo requests#697
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the Gemini video generation provider to omit the generateAudio parameter, treating it as a compatibility no-op since the current Veo 3.1 API rejects it. Additionally, it refactors media sending routes to forward WhatsApp voice-note audio as an audioBuffer instead of base64 and normalizes the MIME type for OGG audio. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 455ca32c66
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| function buildSendMediaMetadata(data: z.infer<typeof sendMediaSchema>): Record<string, unknown> { | ||
| if (data.type === 'audio' && data.voiceNote === true && data.base64) { | ||
| return { audioBuffer: Buffer.from(data.base64, 'base64'), ptt: true }; |
There was a problem hiding this comment.
Preserve base64 for voice-note conversion
When callers send a base64 voice note that is not already OGG/Opus (for example omni send --media clip.mp3 --voice, which posts base64), this replaces metadata.base64 with audioBuffer. The WhatsApp preprocessing path still only looks at message.content.mediaUrl or message.metadata?.base64 before calling convertBufferForVoiceNote (packages/channel-whatsapp/src/plugin.ts around processAudioForVoiceNote), so it now returns early and skips conversion, sending the original MP3/WAV buffer as ptt instead of a WhatsApp-compatible OGG/Opus voice note. Either keep the base64 through preprocessing or update the WhatsApp converter to consume audioBuffer.
Useful? React with 👍 / 👎.
Summary
Verification